import Vue from 'vue'
import { URL_PREFIX } from '@/api/index'

/* /command/list
指令列表 */

/* /command/audits
待审核指令列表 */
export const getAllDirectiveList = (params) => Vue.http.get(URL_PREFIX + '/command/list', { params })

/* /command/detail/info/{id}
指令转发详情信息 */
export const getCommandDetail = (id) => Vue.http.get(URL_PREFIX + '/command/detail/info/' + id)

/* /command/detail/supervise
督办指令 */
export const postCommandSupervise = (params) =>
  Vue.http.post(URL_PREFIX + '/command/detail/supervise/', null, { params })

/* /command/detail/list/{id}
指令详情信息(LIST回显示) */
export const getCommandDetail_list = (id, params) => Vue.http.get(URL_PREFIX + '/command/detail/list/' + id, { params })

/* /command/detail/update
更新指令反馈内容条目 */
export const getCommandDetail_list_update = (data) => Vue.http.post(URL_PREFIX + '/command/detail/update', data)

/* /command/detail/delete
删除指令反馈内容条目 */
export const postCommandDetail_list_delete = (params) =>
  Vue.http.post(URL_PREFIX + '/command/detail/delete', null, { params })

/* /command/detail/export
指令详情数据导出 */
export const postCommandDetail_list_export = (data) => Vue.http.post(URL_PREFIX + '/command/detail/export', data)

/* /command/states/normal
查询指令状态列表 */
export const getStateList = (params) => Vue.http.get(URL_PREFIX + '/command/states/normal')